<html>
<head>
	<title>Excersise 1</title>
	<link href="styles/js-console.css" rel="stylesheet" />
</head>
<body>
	<div id="js-console"></div>
	<script src="scripts/js-console.js"></script>
	<script>

	function lastDigitName(number)
	{
				jsConsole.write("the last digit of number :" + number + ", is: ");
				var digit=number%10;
				switch(digit)
				{
				case 1: {jsConsole.writeLine("one");break;}
				case 2: {jsConsole.writeLine("two");break;}				
				case 3: {jsConsole.writeLine("three");break;}
				case 4: {jsConsole.writeLine("four");break;}
				case 5: {jsConsole.writeLine("five");break;}
				case 6: {jsConsole.writeLine("six");break;}
				case 7: {jsConsole.writeLine("seven");break;}
				case 8: {jsConsole.writeLine("eight");break;}
				case 9: {jsConsole.writeLine("nine");break;}				
				case 0: {jsConsole.writeLine("zero");break;}				
				}
							
	}
	var number = 123;
	lastDigitName(number);
	var number = 414;
	lastDigitName(number);	
	var number = 111;
	lastDigitName(number);	
	var number = 11356;
	lastDigitName(number);
	</script>
</body>
</html>
